Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce an analyzer plugin for the test package. #2461

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srawlins
Copy link
Member

Note: I'm not strongly suggesting this PR be accepted today as is. But I'm offering it up.

As part of the new analyzer plugin system, I'd like to offer some first-party-maintained analyzer plugins. I don't intend for us to maintain complex plugins necessarily. But good bang-for-our-buck plugins have some great benefits:

  • We provide examples of analyzer plugins for others to crib. This plugin clocks in at 160 lines of code, offering a static warning rule and a quick fix.
  • We provide value to customers of our first-party packages, like the test package.

If there are other static analyses that the team has dreamed of, I'd love to evaluate them for complexity and possibly add more static analyses to this plugin.

Again, we don't need to land this any time soon, if the team is hesitant to check this in, maintain it, etc. The new analyzer system is not officially released, and the API is probably not super stable. I'm opening this PR for the discussion, and to have URL to point to as a real world analyzer plugin example.

Copy link

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

@@ -0,0 +1,13 @@
# test_analyzer_plugin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add something to the package:test readme as well, informing users of this plugin and how to enable it for their project.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are very "soft launching" analyzer plugins ATM, I think we don't want to advertise it there yet. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you I guess, but we won't get usage if we don't advertise it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants